package geppetto.phraseHMM.phraseExtraction.phraseAccepter;

import geppetto.phraseHMM.phraseExtraction.extractedphrase.ExtractedPhrasePair;
import geppetto.phraseScorer.AbstractPhraseScorer;

public class PosteriorAccept extends AbstractPhraseAccepter{

	double thresh;
	AbstractPhraseScorer posteriorScorer;
	
	public PosteriorAccept(double thresh, AbstractPhraseScorer scorer) {
		this.thresh = thresh;
		this.posteriorScorer = scorer;
	}
/*	
	public  boolean acceptPhrase(int sentenceNumber, byte sentenceSource, int[] foreingSentence, int[] sourceSentence, int sourceStartPos, int sourceEndPos,int foreignStartPos, int foreignEndPos, double score){
		return score >= thresh;
	}
*/
	@Override
	public boolean acceptPhrase(ExtractedPhrasePair epp) {
		return posteriorScorer.getPhraseScore(epp) >= thresh;
	}
	
//	public  boolean acceptNullPhrase(int sentenceNumber,byte sentenceSource, int[] foreingSentence, int[]  sourceSentence,
//			int foreignStartPos, int foreignEndPos, double score){
//		return true;
//	}
	
}
